update rust-cdm contract tests#116
Merged
Merged
Conversation
Contributor
|
Dev build ready — try this branch: |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
E2E Test Pass · ✅ PASSTag:
Sentry traces: view spans for this run |
…w in the error logs on failure
PolkaVM uses a custom JSON target spec which requires the nightly -Zjson-target-spec feature — stable rejects it outright. Switch the install-rust-pvm CI step from stable to nightly, set nightly as default so cargo-pvm-contract picks it up, and add rust-toolchain.toml to the fixture so local builds self-configure.
…cal runner Without a skipIf guard the CDM describe block runs in every local mode (smoke/pr/nightly) and fails immediately on machines that don't have the nightly Rust toolchain + cargo-pvm-contract installed. Add a module-level hasCargoPvmContract() probe and gate the describe block on it — CI always installs the tool so the test runs there, local runs without it skip cleanly. Also add a warning to tools/e2e-local.sh alongside the existing ipfs check so developers know why the cell is skipped and how to install.
Collaborator
Current state + what's needed nextAgreed approach: Path A (same pattern as foundry/hardhat) Foundry and hardhat E2E tests never exercise the full compilation chain — they always use What the PR does today (Path B — to be replaced):
What it should do (Path A):
Blocker: need the pre-built artifacts committed. Steps: cd e2e/cli/fixtures/projects/rust-cdm
cargo pvm-contract build --release # requires nightly + cargo-pvm-contract
# commit the resulting target/<crate>.release.polkavm filesOnce artifacts are committed, I'll:
|
Match the foundry/hardhat deploy cells by running the CDM deploy test with --no-contract-build against committed PolkaVM artifacts. This removes the CI dependency on rustup, nightly Rust, cargo-pvm-contract, and a system C linker while still exercising CDM contract deployment end-to-end.
Skip-build CDM deploys now scan target/*.release.polkavm directly instead of calling detectContracts(), which shells out to cargo metadata. This keeps the E2E Path A setup independent of Cargo while preserving the real contract deployment path.
Move pr-deploy-cdm to the top of the serial publish E2E matrix so CDM failures surface before the slower frontend/foundry deploy cells.
Restore the semantic CDM skip-build path through detectContracts(), and make the pr-deploy-cdm E2E cell install the Rust/CDM prerequisites it needs for cargo metadata. The deploy still uses --no-contract-build with committed PolkaVM artifacts.
The CDM installer writes cdm to ~/.cdm/bin and updates shell startup files, but the current GitHub Actions shell does not reload those files. Add the path explicitly before verifying cdm and running the deploy cell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #108.
Summary
This PR restores CDM/PVM deploy coverage in the PR E2E matrix and updates the deploy dependencies needed for that path to run.
What changed
rust-cdmstub fixture with a real CDM Rust workspace containingcounter,counter-reader, andcounter-writer.target/*.release.polkavmartifacts used by the E2E deploy.--no-contract-build, matching the foundry/hardhat E2E pattern of deploying prebuilt artifacts.pr-deploy-cdmback to thetest-publishmatrix and runs it first so failures surface earlier.detectContracts(), which callscargo metadata.e2ecdm00.bulletin-deployto0.7.10for the DotNS/deploy fixes needed by this flow.dot-runs.logbehave consistently.Verification
pnpm format:check pnpm exec vitest run src/utils/deploy/contracts.test.ts pnpm build